From: Florian Müllner Date: Mon, 20 Aug 2012 20:05:00 +0000 (+0200) Subject: grabHelper: Support optional parameters to pushModal() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5431 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5f367248c56cc19b5f9bc2efa9221fa5efd9e074;p=gnome-shell.git grabHelper: Support optional parameters to pushModal() https://bugzilla.gnome.org/show_bug.cgi?id=688202 --- diff --git a/js/ui/grabHelper.js b/js/ui/grabHelper.js index 8b81b1994..3623a0f66 100644 --- a/js/ui/grabHelper.js +++ b/js/ui/grabHelper.js @@ -23,6 +23,7 @@ function _navigateActor(actor) { // GrabHelper: // @owner: the actor that owns the GrabHelper +// @params: optional parameters to pass to Main.pushModal() // // Creates a new GrabHelper object, for dealing with keyboard and pointer grabs // associated with a set of actors. @@ -34,8 +35,9 @@ function _navigateActor(actor) { const GrabHelper = new Lang.Class({ Name: 'GrabHelper', - _init: function(owner) { + _init: function(owner, params) { this._owner = owner; + this._modalParams = params; this._grabStack = []; @@ -165,7 +167,7 @@ const GrabHelper = new Lang.Class({ _takeModalGrab: function() { let firstGrab = (this._modalCount == 0); if (firstGrab) { - if (!Main.pushModal(this._owner)) + if (!Main.pushModal(this._owner, this._modalParams)) return false; this._capturedEventId = global.stage.connect('captured-event', Lang.bind(this, this._onCapturedEvent));